package com.itheima.service;

import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.entity.QueryPageBeano;
import com.itheima.entity.Result;
import com.itheima.pojo.Setmeal;
import com.itheima.pojo.Order;

import java.util.List;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 体检预约服务接口
 */
public interface OrderService {

    //体检预约
    public Result order(Map map) throws Exception;

    //根据id查询预约信息，包括体检人信息、套餐信息
    public Map findById(Integer id) throws Exception;


    //添加预约
    public Result submit(Order order, Integer setmealId) throws Exception;

    //预约分页
    public PageResult findOrdersPage(QueryPageBeano queryPageBean);

    //编辑数据回显
    public Map findAllById(Integer id);
    public int findSetmealIdByOrderId(int id);

    //修改预约信息
    public void edit(Order order, Integer setmealId);

    //删除预约信息
    void delete(Integer id);

    void changeStatus(Order order);

    Map<String, Object> findByDate(Date startTimeDate, Date endTimeDate);

    List<Map<String, Object>> findSexCount();

    List<Map<String, Object>> findAgeCount();

    List<Map<String, Object>> queryAppointmentRecord(String startDate, String endDate, String phoneNumber);


    Map findOrderDetailsById(Integer id);
}
